From: Matthias Clasen Date: Tue, 13 Jun 2017 17:09:56 +0000 (-0400) Subject: file chooser: Don't pass NULL as title to the portal X-Git-Tag: archive/raspbian/3.24.39-1+rpi1~1^2~65^2~39^2~503 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=6f4e4952a3b7d9257021c500ed489d5bd2e2cdc6;p=gtk%2B3.0.git file chooser: Don't pass NULL as title to the portal This causes critical warnings. --- diff --git a/gtk/gtkfilechoosernativeportal.c b/gtk/gtkfilechoosernativeportal.c index 45ceb3f4cf..bf29442d09 100644 --- a/gtk/gtkfilechoosernativeportal.c +++ b/gtk/gtkfilechoosernativeportal.c @@ -288,6 +288,7 @@ show_portal_file_chooser (GtkFileChooserNative *self, GDBusMessage *message; GVariantBuilder opt_builder; gboolean multiple; + const char *title; message = g_dbus_message_new_method_call ("org.freedesktop.portal.Desktop", "/org/freedesktop/portal/desktop", @@ -333,10 +334,12 @@ show_portal_file_chooser (GtkFileChooserNative *self, g_variant_builder_add (&opt_builder, "{sv}", "choices", serialize_choices (GTK_FILE_CHOOSER_NATIVE (self))); + title = gtk_native_dialog_get_title (GTK_NATIVE_DIALOG (self)); + g_dbus_message_set_body (message, g_variant_new ("(ss@a{sv})", parent_window_str ? parent_window_str : "", - gtk_native_dialog_get_title (GTK_NATIVE_DIALOG (self)), + title ? title : "", g_variant_builder_end (&opt_builder))); g_dbus_connection_send_message_with_reply (data->connection,